﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace HelpersDotNet.HttpModules
{
    public sealed class HttpCompressionElement : ConfigurationElement
    {
        [ConfigurationProperty(HttpCompressionMappingConstants.ContentTypeAttributeName,
            IsKey = true, IsRequired = true)]
        public string ContentType
        {
            get { return this[HttpCompressionMappingConstants.ContentTypeAttributeName].ToString(); }
            set { this[HttpCompressionMappingConstants.ContentTypeAttributeName] = value; }
        }

        [ConfigurationProperty(HttpCompressionMappingConstants.CompressionTypeAttributeName,
            IsRequired = false)]
        public string CompressionType
        {
            get { return this[HttpCompressionMappingConstants.CompressionTypeAttributeName].ToString(); }
            set { this[HttpCompressionMappingConstants.CompressionTypeAttributeName] = value; }
        }

        [ConfigurationProperty(HttpCompressionMappingConstants.CompressionModeAttributeName,
            IsRequired = false)]
        public string CompressionMode
        {
            get { return this[HttpCompressionMappingConstants.CompressionModeAttributeName].ToString(); }
            set { this[HttpCompressionMappingConstants.CompressionModeAttributeName] = value; }

        }
    }
}
